/**
 * @author furthurr
 */
var win = Titanium.UI.currentWindow;
win.backgroundImage= '../imgs/WallDoctorados.png';
//ELEMENTOS
var bl1 = Titanium.UI.createLabel({
	text: 'Humanidades y Ciencias de la Conducta',
	backgroundlColor: 'transparent',
	width:'120',
	height:'auto',
	font:{fontSize:10, fontFamily:'AppleGothic'},
    textAlign:'center'	
}); 
var humanCon = Titanium.UI.createButtonBar({
	//title:'Humanidades y Ciencias de la Conducta',
	labels:[''],
	backgroundColor:'#C0C0C0',
	style:Ti.UI.iPhone.SystemButtonStyle.BAR,
	top:130,
	left:0,
	height:25,
	width:155
});
humanCon.add(bl1);
var bl2 = Titanium.UI.createLabel({
	text: 'Ciencias Sociales',
	backgroundlColor: 'transparent',
	width:'120',
	height:'auto',
	font:{fontSize:13, fontFamily:'AppleGothic'},
    textAlign:'center'	
}); 
var sociales = Titanium.UI.createButtonBar({
	//title:'Humanidades y Ciencias de la Conducta',
	labels:[''],
	backgroundColor:'#C0C0C0',
	style:Ti.UI.iPhone.SystemButtonStyle.BAR,
	top:160,
	left:0,
	height:25,
	width:155
});
sociales.add(bl2);
var bl3 = Titanium.UI.createLabel({
	text: 'Ciencias Economicas',
	backgroundlColor: 'transparent',
	width:'140',
	height:'auto',
	font:{fontSize:13, fontFamily:'AppleGothic'},
    textAlign:'center'	
}); 
var economicas = Titanium.UI.createButtonBar({
	//title:'Humanidades y Ciencias de la Conducta',
	labels:[''],
	backgroundColor:'#C0C0C0',
	style:Ti.UI.iPhone.SystemButtonStyle.BAR,
	top:130,
	left:167,
	height:25,
	width:155
});
economicas.add(bl3);
var bl4 = Titanium.UI.createLabel({
	text: 'Ingenieria e Industrias',
	backgroundlColor: 'transparent',
	width:'140',
	height:'auto',
	font:{fontSize:13, fontFamily:'AppleGothic'},
    textAlign:'center'	
}); 
var ingenieria = Titanium.UI.createButtonBar({
	//title:'Humanidades y Ciencias de la Conducta',
	labels:[''],
	backgroundColor:'#C0C0C0',
	style:Ti.UI.iPhone.SystemButtonStyle.BAR,
	top:160,
	left:167,
	height:25,
	width:155
});
ingenieria.add(bl4);
var bcloseLabel=Titanium.UI.createLabel({
    text:'Menu',
    backgroundlColor: 'transparent',
	width:'125',
	height:'auto',
	font:{fontSize:13, fontFamily:'AppleGothic'},
    	textAlign:'center'	
});
var bclose = Titanium.UI.createButtonBar({
	style:Titanium.UI.iPhone.SystemButtonStyle.BAR,
	backgroundColor:'#C0C0C0',
    labels:[''],
	top:100,	
	left:80,
    height:26,
    width:155
}); 
bclose.add(bcloseLabel);
win.add(humanCon);
win.add(sociales);
win.add(economicas);
win.add(ingenieria);
win.add(bclose);

//EVENTOS
humanCon.addEventListener('click',function (e){
	Titanium.API.info("Humanidades y conducta ... clicked");
	var next = Titanium.UI.createWindow({
		url:'./humanidades/appHumanCon.js'
	});
	next.open({transition:Ti.UI.iPhone.AnimationStyle.CURL_UP});
});

sociales.addEventListener('click',function (e){
	Titanium.API.info("Ciencias Sociales ... clicked");
	var next = Titanium.UI.createWindow({
		url:'./sociales/appsociales.js'
	});
	next.open({transition:Ti.UI.iPhone.AnimationStyle.CURL_UP});
});

economicas.addEventListener('click',function (e){
	Titanium.API.info("Ciencias Economicas ... clicked");
	var next = Titanium.UI.createWindow({
		url:'./economicas/appEconomicas.js'
	});
	next.open({transition:Ti.UI.iPhone.AnimationStyle.CURL_UP});
});

ingenieria.addEventListener('click',function (e){
	Titanium.API.info("Humanidades y conducta ... clicked");
	var next = Titanium.UI.createWindow({
		url:'./ingenieria/appIngenieria.js'
	});
	next.open({transition:Ti.UI.iPhone.AnimationStyle.CURL_UP});
});

bclose.addEventListener('click', function(e) {
  Titanium.API.info("ventana de Doctorados cerrada");
  var Menu = Titanium.UI.createWindow({
  	url:'../ModMenu/appMenu.js'
  });
  Menu.open({transition:Ti.UI.iPhone.AnimationStyle.CURL_DOWN});
});

